let btnConfig = require('config.js')
let App = require('app.js')
let Comman = require('comman.js')
sleep(2000)
let messageItems = btnConfig.message.messageSiXinText.default()
if (!messageItems.length) {
    console.log('回复任务：未找到私信内容请检查')
} else {
    let userImgBtn = btnConfig.message.messageSiXinUserImg.default()
    console.log(messageItems.length + '条私信内容');
    console.log('messageItems', messageItems[0].bounds().left);
    let deviceLeft = userImgBtn ? userImgBtn.bounds().right : 200;
    console.log('deviceLeft', deviceLeft);

    // 区分用户和本人留言
    let replayInfo = messageItems.filter(mess => mess.bounds().left < 200)
    if (!replayInfo.length) {
        console.log('回复任务：未找到私信内容请检查--2');
    } else {
        console.log(replayInfo[replayInfo.length - 1].text());

    }

}
